package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


import java.util.List;

/**
 * @author 西门凌兰
 * @version 1.0
 */
@Mapper

public interface SetmealDishMapper {

    /**
     * 根据菜品ids查询套餐ids
     * @param dishIds
     * @return
     */

    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);

    /**
     * 根据setmealId查询
     * @param setmealId
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
    List<SetmealDish> getBySetmealId(Long setmealId);

    /**
     * 套餐菜品的添加
     * @param setmealDishes
     */

    void inserts(List<SetmealDish> setmealDishes);

    /**
     * 根据套餐ids删除菜品
     * @param setmealIds
     */
    void deleteBySetmealIds(List<Long> setmealIds);
}
